package com.yuyou.train.stream.mq;

import java.time.LocalDateTime;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {

	@Autowired
	private AmqpTemplate rabbitTemplate;
	
	public void send() {
		String context = "hello " + LocalDateTime.now();
		System.out.println("Sender : " + context);
		this.rabbitTemplate.convertAndSend("hello", context);
	}
	
	public void send2() {
		String context = "hello " + LocalDateTime.now();
		System.out.println("Sender123123123 : " + context);
//		this.rabbitTemplate.convertAndSend("input.group1", context);
	}
	
	
	
	
}
